import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
import { ManualTimestamp } from "../decorators/manual-timestamp.decorator";

@Entity({ name: "areas" })
@ManualTimestamp()
export class AreaEntity {
  @PrimaryGeneratedColumn({ type: "int" })
  id!: number;

  @Column({ type: "varchar", length: 100 })
  name!: string;

  @Column({ type: "int", default: 0 })
  style!: number;

  @Column({ type: "int", default: 0 })
  state!: number;

  @Column({ type: "varchar", length: 255 })
  mod_dstid!: string;

  @Column({ type: "varchar", length: 255, default: "" })
  descr!: string;

  @Column({ type: "int", default: 0 })
  ol_count!: number;

  @Column({ type: "int", default: 0 })
  order_lvl!: number;

  @Column({ type: "int", default: 0 })
  ol_limit!: number;

  @Column({ type: "int", default: 0 })
  socket_port!: number;

  @Column({ type: "varchar", length: 64, default: "" })
  socket_ip!: string;
}
